package com.smile.process;

import com.alibaba.fastjson.JSONObject;
import com.smile.mqtt.process.StateBusinessProcessor;
import org.springframework.stereotype.Component;

/**
 * 设备端按需上报向云平台推送的设备属性
 *
 * @author 宁海博
 */
@Component
public class StateBusinessProcessorImpl extends StateBusinessProcessor {

    public static void main(String[] args) {
        JSONObject jsonObject = new JSONObject();
    }

    @Override
    public void process(String data) {
        System.out.println("data=" + data);
        com.alibaba.fastjson2.JSONObject jsonObject = com.alibaba.fastjson2.JSONObject.parseObject(data);
//        cn.hutool.json.JSONObject jsonObject = new cn.hutool.json.JSONObject(data);
//        System.out.println(jsonObject.getJSONObject("data"));

//
//        System.out.println("反序列化的结果为: " + data1);
    }
}
